from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
    return LaunchDescription([
        Node(
            package='rikibot_foc_driver',
            executable='rikibot_driver',
            name='rikibot_driver',
            output='screen',
            parameters=[{
                'port': '/dev/ttyUSB0',
                'baudrate': 115200,
                'base_frame_id': 'base_footprint',
                'odom_frame_id': 'odom',
                'publish_tf': True,
                'wheel_diameter': 0.165,
                'wheel_distance': 0.33,
                'swap_bytes': False,
                'log_level': 'info',
                 # 36V 锂电池参数 (10串)
                'battery_full_voltage': 42.0,    # 满电电压 (10 * 4.2V)
                'battery_empty_voltage': 30.0   # 空电电压 (10 * 3.0V)
            }]
        )
    ])
